<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://www.opensymphony.com/oscache" prefix="cache" %>
<%@ taglib prefix="app" uri="/WEB-INF/tlds/app.tld" %>

<%--<cache:cache key="/index2.jsp">--%>
<c:set var="rootCategories" value="${app:getRootCategories(false)}"/>
<!-- body -->
<table width="100%" border="0" cellpadding="0" cellspacing="0">
    <c:forEach var="category" items="${rootCategories}" varStatus="status">
        <c:set var="categoryItems" value="${app:getItemsForHomePage(category.id)}" scope="page"/>
        <c:url var="tabURL" value="/category2.jsp">
            <c:param name="categoryId" value="${category.id}"/>
        </c:url>
        <tr>
            <td valign="top">
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="22" valign="top">
                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                <!--DWLayoutTable-->
                                <tr>
                                    <td colspan=2 height="22" valign="top"
                                        background="${pageContext.request.contextPath}/images/index_03.gif"
                                        class="demuc_td">
                                        <a class="demuc_a" href='<c:out value="${tabURL}"/>'><b><c:out
                                                value="${category.title}"/></b></a></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td class="titlebaovn"><a class="tuade_tin" href="content.jsp?contentId=${categoryItems[0].id}"><b>
                                        <c:out value="${categoryItems[0].title}"/></b>
                                        - ${categoryItems[0].rssSource.rssProvider.name}</a></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <c:if test="${categoryItems[0].imageLink != null}">
                                        <td valign="top">
                                            <a href="content.jsp?contentId=${categoryItems[0].id}"><div
                                                    align="center" class="thumbnail_image">${categoryItems[0].imageLink}</div></a>
                                        </td>
                                    </c:if>
                                    <td valign="top" class="short_desc">${categoryItems[0].descriptionValue}<a
                                            href="content.jsp?contentId=${categoryItems[0].id}"><IMG align="right"
                                                                                                     src="images/readMore.gif"
                                                                                                     border=0/></a></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td height="21" valign="top" class="tin"><img
                                src="${pageContext.request.contextPath}/images/arrow.gif"/> <a class="changeColor"
                                href="content.jsp?contentId=${categoryItems[1].id}"><c:out
                                value="${categoryItems[1].title}"/> - ${categoryItems[1].rssSource.rssProvider.name}</a>
                        </td>
                    </tr>
                    <tr>
                        <td height="21" valign="top" class="tin"><img
                                src="${pageContext.request.contextPath}/images/arrow.gif"/> <a class="changeColor"
                                href="content.jsp?contentId=${categoryItems[2].id}"><c:out
                                value="${categoryItems[2].title}"/> - ${categoryItems[2].rssSource.rssProvider.name}</a>
                        </td>
                    </tr>
                    <tr>
                        <td height="19" valign="top"><img src="${pageContext.request.contextPath}/images/index_11.gif"
                                                          width="275" height="3" alt="1"/><a
                                href='<c:out value="${tabURL}"/>' class="tin">C&aacute;c tin kh&aacute;c</a></td>
                    </tr>


                </table>
            </td>
        </tr>
    </c:forEach>
</table>


<%--</cache:cache>--%>